cmake_minimum_required(VERSION 3.10)
project(Test)

# 设置C++标准
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 指定输出目录
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
# 添加头文件路径
include_directories(
    ../Tool/include
    include
)

# 查找线程库（pthread）
find_package(Threads REQUIRED)

# 定义可执行文件
add_executable(Test
    main.cpp
    # BlockQueue_test.cpp
    LockFreeQueue_test.cpp
    # Config_test.cpp
    # Variant_test.cpp
    # Program_test.cpp
    # SignalSlot_test.cpp
    # EventLoop_test.cpp
    # Logger_test.cpp 
    # Loggers_test.cpp
    # ThreadPool_test.cpp
    # Random_test.cpp
    # DataTime_test.cpp
    # EventLoopExample.cpp
    # Database_test.cpp
    # Timer_test.cpp
)

# add_executable(TCP_client
#     main.cpp
#     TCP_client.cpp
# )

# add_executable(Code_test
#     main.cpp
#     code_test.cpp
# )

# add_executable(TCP_server
#     main.cpp
#     TCP_server.cpp
# )

# add_executable(DatabaseTest
#     main.cpp
#     Database_Pressuretest.cpp
# )

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    set(TOOLS_NAME "Tools_d")
else()
    set(TOOLS_NAME "Tools")
endif()

target_link_libraries(Test PRIVATE ${TOOLS_NAME} Threads::Threads)
# target_link_libraries(TCP_client PRIVATE ${TOOLS_NAME} Threads::Threads)
# target_link_libraries(TCP_server PRIVATE ${TOOLS_NAME} Threads::Threads)
# target_link_libraries(DatabaseTest PRIVATE ${TOOLS_NAME} Threads::Threads)
# target_link_libraries(Code_test PRIVATE ${TOOLS_NAME} Threads::Threads)